import {RequestUtil} from '@/utils'

export class SystemHttp {
    static PREFIX = "/manager/system"


    // ====== 机构管理 ============
    static getOrganList = () => RequestUtil.getAjax(`${this.PREFIX}/org/organ/list`)

    static addOrgan = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/org/organ/add`, data)

    static updateOrgan = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/org/organ/update/${id}`, data)

    static delOrgan = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/org/organ/delete`, data)




    // ====== 部门管理 ============
    static getDeptList = () => RequestUtil.getAjax(`${this.PREFIX}/org/dept/list`)

    static addDept = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/org/dept/add`, data)

    static updateDept = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/org/dept/update/${id}`, data)

    static delDept = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/org/dept/delete`, data)






    // ====== 职务管理接口 ============
    static getPositionPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/org/position/pageList`, params)

    static addPosition = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/org/position/add`, data)

    static updatePosition = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/org/position/update/${id}`, data)

    static delPosition = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/org/position/delete`, data)



}
